package com.core;

import junit.framework.TestCase;

public class DoubanPropertiesTest extends TestCase {

	public void setUp() throws Exception{
		super.setUp();
	}
	
	public void tearDown() throws Exception{
		super.tearDown();
	}
	
	public void testGetProperties() throws Exception{
		setUp();
		assertEquals("10.10.10.10", DoubanProperties.getInstance("doubantest.properties").getProperty("proxy"));
		assertEquals("8080", DoubanProperties.getInstance("doubantest.properties").getProperty("port"));
		tearDown();
	}
	
	public void testGetPropertiesDoesNotHaveFile() throws Exception{
		setUp();
		String property = DoubanProperties.getInstance("anyfile").getProperty("anykey");
		assertEquals(property, null);
		tearDown();
	}
}
